//
//  DataBase.h
//  豆瓣_精简版
//
//  Created by dllo on 15/11/7.
//  Copyright © 2015年 蓝鸥科技. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "FMDatabase.h"
#import "Movie.h"
#import "User.h"
@interface DataBase : NSObject

@property(nonatomic,retain)FMDatabase *db;

+ (instancetype)shareDataBase;

-(void)openDB;

- (void)createMovieTable;

- (void)createUserTable;

- (void)createHuanCunTable;

-(void)insertMovieData:(Movie *)movie;

-(void)insertMovieDetailData:(Movie *)movie;

- (void)insertUser:(NSString *)name password:(NSString *)password;

-(void)deleteData:(NSString *)movieName;

-(void)dropTable:(NSString *)tableName;

-(NSMutableArray *)selectMovieData:(NSString *)userName;

-(NSMutableArray *)selectMovieUserData:(NSString *)userName movieName:(NSString *)movieName;

-(NSMutableArray *)selectMovieUserData:(NSString *)userName;

-(NSMutableArray *)selectMovieDetailData;

-(NSMutableArray *)selectUserData:(NSString *)name1;

@end
